# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年12月07日
"""
import pandas as pd

index = pd.date_range('20200201', '20200215')
data = [3, 6, 7, 4, 2, 1, 3, 8, 9, 10, 12, 15, 13, 22, 14]
s1_data = pd.Series(data=data, index=index)
print(s1_data)
print("=" * 30)
print(s1_data.rolling(3).mean())
print("="*30)
print(s1_data.rolling(3, min_periods=1).mean())

